/************************************************************************
                        AuthenticationManager.h
this class is a part of the Interface unit of Intersil
AuthenticationManager is responsible for asserting that a user has 
the required permissions to run a request.
I.E. only ADMINISTRATOR can add/remove courses
AuthenticationManager does not communicate directly with database,
it uses the local logged in information for permission authentication.
* when a user logges in his permission level is stored in Interface.
* inherits from Object for future extendability.
*/
#ifndef AUTHENTICATIONMANAGER_H
#define AUTHENTICATIONMANAGER_H
#include "..\Shered\Object.h"
#include "..\Shered\GlobalFunctions.h"
// class AuthenticationManager
// AuthenticationManager checks if logged user can run a request
class Interface;
class Request;
class AuthenticationManager : virtual public Object {
public:
	// Ctor/Dtor
	AuthenticationManager(Interface &t_ifc);//t_ifc is the Interface holding information
											//about the logged in user.
	virtual ~AuthenticationManager ();
	//checkPermissions method does the permission validation.
	//if the user logged in at Interface has permission to run
	//request it returns true, else false.
	bool checkPermissions (const Request &request ); 
protected:
private:
	AuthenticationManager(const AuthenticationManager  &am);
	AuthenticationManager &operator=(const AuthenticationManager &rhs);
	Interface &m_ifc ;//reference to Interface containing the logged in user
};
#endif // AUTHENTICATIONMANAGER_H
